/*
 * marker.h
 *
 *  Created on: Jul 28, 2010
 *      Author: Pierre Lindenbaum PhD
 *              plindenbaum@yahoo.fr
 *              http://plindenbaum.blogspot.com
 *              
 */
#ifndef TRANS_MARKER_H
#define TRANS_MARKER_H
#include <iostream>
#include <stdint.h>
#include "chromosome.h"


class Marker
    {
    private:
	    std::string _name;
	    const ChromosomePtr _chrom;
	    int64_t _position;
	    char A0;
	    char A1;
    public:
	    Marker(
		    std::string name,
		    const ChromosomePtr chrom,
		    int64_t position,
		    char A0,
		    char A1
		    ):_name(name),_chrom(chrom),_position(position),A0(A0),A1(A1)
		{

		}

    char a0() const
	{
        return A0;
	}

    char a1() const
	{
        return A1;
	}

    const ChromosomePtr chrom() const
	{
        return _chrom;
	}

    const char* name() const
	{
        return _name.c_str();
	}

    int64_t position() const
	{
        return _position;
	}

    friend std::ostream& operator << (std::ostream& out,const Marker& o);


    };

 std::ostream& operator << (std::ostream& out,const Marker& o)
    {
     out << o.name() << " "<< *(o.chrom())<<":" << o.position() << " " << o.a0()<< "/" << o.a1();
    return out;
    }
typedef Marker* MarkerPtr;
#endif
